package services;

import domain.entities.Droga;

/**
 * Created with IntelliJ IDEA.
 * User: nico
 * Date: 22/08/12
 * Time: 18:10
 * To change this template use File | Settings | File Templates.
 */
public class CriteriaDrug extends Criteria{

    private Droga droga;

    public CriteriaDrug(Droga droga) {
        this.droga = droga;
    }

    @Override
    public boolean isIn(Object element) {
        boolean isIn = true;
        Droga other = (Droga)element;

        isIn &= isSubstring(droga.getDrugName(), other.getDrugName());

        return isIn;
    }

}
